package com.example.xianzhi.service.impl;

import com.example.xianzhi.dao.RelationDao;
import com.example.xianzhi.dao.impl.RelationDaoImpl;
import com.example.xianzhi.service.RelationService;

public class RelationServiceImpl implements RelationService {
        private RelationDao relationDao = new RelationDaoImpl();

        @Override
        public int selectRelation(int user_id, int goods_id) {
                return relationDao.selectRelation(user_id,goods_id);
        }

        @Override
        public void updateRelation(int user_id, int goods_id, int need) {
                relationDao.updateRelation(user_id,goods_id,need);
        }

        @Override
        public void insertRelation(int user_id, int goods_id, int need) {
                relationDao.insertRelation(user_id,goods_id,need);
        }

        @Override
        public int selectNeed(int user_id, int goods_id) {
                return relationDao.selectNeed(user_id,goods_id);
        }
        @Override
        public int deleterela(int relation_id) {
                return relationDao.deleterela(relation_id);
        }

}
